package com.virus.controller;

import com.virus.bean.Student;
import com.virus.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/hello")
public class HelloController {

    @Autowired
    private StudentService studentService;

    @RequestMapping("/world")
    public List<Student> helloWorld() {
        return studentService.getList();
    }
}
